<?php
/**
 * This file is form http://findcat.cn
 *
 * @link     https://findcat.cn
 * @email    1476982312@qq.com
 */
namespace App\Markdown;

/**
 * Class Markdown.
 */
class Markdown
{
    /**
     * @var Parser
     */
    protected $parser;

    /**
     * Markdown constructor.
     */
    public function __construct(Parser $parser)
    {
        $this->parser = $parser;
    }

    /**
     * @param $text
     *
     * @return string
     */
    public function markdown($text)
    {
        return $this->parser->makeHtml($text);
    }
}
